//
//  Theme.swift
//  DemoDarkMode
//
//  Created by zhuxuhong on 2022/3/30.
//

import UIKit

public protocol BWTheme {
    associatedtype Style: BWThemeStyle
    
    static var shared: Self{get}
    var currentStyle: Style {get}
    func updateStyle(with newStyle: Style)
}

public protocol BWThemeStyle: Hashable {
}

public protocol BWThemeColor: Hashable {
    associatedtype Style: BWThemeStyle
    func uiColor(forTheme style: Style) -> UIColor?
    var themeColor: UIColor? {get}
}

public protocol BWThemeAdaptable {
    associatedtype Style: BWThemeStyle
    func updateThemeIfNeeded(style: Style)
}
